package com.zjq.smartdevice.controller;

import com.zjq.smartdevice.dto.R;
import com.zjq.smartdevice.service.HumitureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @User zhangjiaqi
 * @Project project
 * @Package com.zjq.smartdevice.controller
 * @Date 2022/3/27 21:33
 */
@RestController
@RequestMapping("/humitures")
public class HumitureController {

    private HumitureService humitureService;

    @Autowired
    public void setHumitureService(HumitureService humitureService) {
        this.humitureService = humitureService;
    }

    @GetMapping("/humitures")
    public R getOneHourData() {
        return R.setOK(humitureService.findOneHourData());
    }

}

